package com.tjbank.cssys.service.convert;

import java.util.List;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import com.tjbank.cssys.dto.PermissionDTO;
import com.tjbank.cssys.entityext.Permission;
import com.tjbank.cssys.mybatis.entity.IamPermission;

@Mapper
public interface PermissionConvert {

    PermissionConvert INSTANCE = Mappers.getMapper(PermissionConvert.class);

    IamPermission dtoToEntity(PermissionDTO dto);
    
    Permission dtoToPermission(PermissionDTO dto);

    PermissionDTO entityToDto(IamPermission entity);
    
    PermissionDTO permissionToDto(Permission entity);

    List<PermissionDTO> entitiesToDtoList(List<IamPermission> entities);
    
    List<PermissionDTO> permsToDtoList(List<Permission> entities);

}
